﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.WeChatMall.Domain.Entitys.ShopInfo
{
    public class ShopSupportInfoEntity
    {
        /// <summary>
        ///     店铺id
        /// </summary>
        [JsonProperty("shopid")]
        public long ShopId { get; set; }

        /// <summary>
        ///     优惠类型（用于显示前端图标）
        /// </summary>
        [JsonProperty("supporttype")]
        public string SupportType { get; set; }

        /// <summary>
        ///     优惠文案
        /// </summary>
        [JsonProperty("supportremark")]
        public string SupportRemark { get; set; }

        /// <summary>
        ///     修改时间
        /// </summary>
        [JsonProperty("updatedtime")]
        public DateTime UpdatedTime { get; set; }

        /// <summary>
        ///     修改人
        /// </summary>
        [JsonProperty("updater")]
        public long Updater { get; set; }
    }

    public class ShopSupportsInfoEntityMapper : ClassMapper<ShopSupportInfoEntity>
    {
        public ShopSupportsInfoEntityMapper()
        {
            Table("shopsupportsinfo");
            Map(f => f.ShopId).Column("shopid").Key(KeyType.Assigned);
            Map(f => f.SupportType).Column("supporttype");
            Map(f => f.SupportRemark).Column("supportremark");
            Map(f => f.UpdatedTime).Column("updatedtime");
            Map(f => f.Updater).Column("updater");
        }
    }
}